import Vue from 'vue'
import Router from 'vue-router'
import mainContainer from '@/components/mainContainer'
import singlePageContainer from '@/components/singlePageContainer'
import login from '@/pages/login'
import account from '@/pages/account'
import receive from '@/pages/receive'
import send from '@/pages/send'
import sell from '@/pages/sell'
import buy from '@/pages/buy'
import transactions from '@/pages/transactions'
import contacts from '@/pages/contacts'
import security from '@/pages/security'
import settings from '@/pages/settings'
import noticeList from '@/pages/notice'
import noticeDetail from '@/pages/notice/noticeDetail'
import personalInformationAdd from '@/pages/settings/personalInformationAdd'

Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      name: 'singlePageContainer',
      component: singlePageContainer,
      redirect: '/login',
      children: [
        {
          path: 'login',
          component: login
        }
      ]
    },
    {
      path: '/main',
      name: 'mainContainer',
      component: mainContainer,
      children: [
        {
          path: 'account',
          component: account
        },
        {
          path: 'receive',
          component: receive
        },
        {
          path: 'receive/:coin',
          component: receive
        },
        {
          path: 'send',
          component: send
        },
        {
          path: 'send/:coin',
          component: send
        },
        {
          path: 'sell',
          component: sell
        },
        {
          path: 'sell/:coin',
          component: sell
        },
        {
          path: 'buy',
          component: buy
        },
        {
          path: 'buy/:coin',
          component: buy
        },
        {
          path: 'transactions',
          component: transactions
        },
        {
          path: 'transactions/:coin',
          component: transactions
        },
        {
          path: 'contacts',
          component: contacts
        },
        {
          path: 'security',
          component: security
        },
        {
          path: 'settings',
          component: settings
        },
        {
          path: 'notice',
          component: noticeList
        },
        {
          path: 'noticeDetail',
          component: noticeDetail
        },
        {
          path: 'personalInformationAdd',
          component: personalInformationAdd
        }
      ]
    }
  ]
})
